/*
 *    Copyright (c) 2018-2025, waterx All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: waterx
 */

package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 审计记录表
 *
 * @author PIG
 * @date 2023-02-28 20:12:23
 */
@Data
@TableName("sys_audit_log")
@EqualsAndHashCode(callSuper = true)
public class SysAuditLog extends Model<SysAuditLog> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty(value = "id", converter = LongStringConverter.class)
	private Long id;

	/**
	 * 审计名称
	 */
	@ExcelProperty("audit_name")
	private String auditName;

	/**
	 * 字段名称
	 */
	@ExcelProperty("audit_field")
	private String auditField;

	/**
	 * 变更前值
	 */
	@ExcelProperty("before_val")
	private String beforeVal;

	/**
	 * 变更后值
	 */
	@ExcelProperty("after_val")
	private String afterVal;

	/**
	 * 创建人
	 */
	@ExcelProperty(value = "create_by", converter = CustomStringConverter.class )
	private String createBy;

	/**
	 * 创建时间
	 */
	@ExcelProperty("create_time")
	private Date createTime;

	/**
	 * 删除标记
	 */

	@ExcelProperty("del_flag")
	private String delFlag;

	/**
	 * 租户id
	 */
	@ExcelProperty(value = "tenant_id", converter = LongStringConverter.class)
	private Long tenantId;

}
